package myTeam.timeShop.bean;

// Generated 2016-3-29 15:13:44 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity: 
 */
@Entity
@Table(name = "tb_request", catalog = "db_timeshop")
public class TbRequest implements java.io.Serializable {

	/** 
	 * ����id.
	 */

	private Integer requestId;

	/** 
	 * �����û�id.
	 */

	private TbUser tbUser;

	/** 
	 * ����id.
	 */

	private TbDemand tbDemand;

	/** 
	 * ����ʱ��.
	 */

	private Date requestTime;

	/** 
	 * ����״̬.
	 */

	private Integer requestStatus;

	/** 
	 * ��������.
	 */

	private String requestMessage;

	public TbRequest() {
	}

	public TbRequest(TbUser tbUser, TbDemand tbDemand, Date requestTime,
			Integer requestStatus, String requestMessage) {
		setTbUser(tbUser);
		setTbDemand(tbDemand);
		setRequestTime(requestTime);
		setRequestStatus(requestStatus);
		setRequestMessage(requestMessage);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "request_id", unique = true, nullable = false)
	public Integer getRequestId() {
		return this.requestId;
	}

	public void setRequestId(Integer requestId) {
		this.requestId = requestId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "request_client_id")
	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "request_demand_id")
	public TbDemand getTbDemand() {
		return this.tbDemand;
	}

	public void setTbDemand(TbDemand tbDemand) {
		this.tbDemand = tbDemand;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "request_time", length = 19)
	public Date getRequestTime() {
		return this.requestTime;
	}

	public void setRequestTime(Date requestTime) {
		this.requestTime = requestTime;
	}

	@Column(name = "request_status")
	public Integer getRequestStatus() {
		return this.requestStatus;
	}

	public void setRequestStatus(Integer requestStatus) {
		this.requestStatus = requestStatus;
	}

	@Column(name = "request_message", length = 300)
	public String getRequestMessage() {
		return this.requestMessage;
	}

	public void setRequestMessage(String requestMessage) {
		this.requestMessage = requestMessage;
	}

}
